# Contributor: Lukas Franek <lukas.franek@ui.com>
# Maintainer: Lukas Franek <lukas.franek@ui.com>
pkgname=hpnssh
pkgver=18.4.1
pkgrel=0
pkgdesc="HPNSSH: High performance SSH/SCP"
url="https://psc.edu/hpn-ssh-home"
# s390x: libssh is failing to build
arch="all !s390x"
license="custom"
makedepends="
	autoconf
	automake
	libtool
	linux-headers
	cmake
	openssl-dev>3
	zlib-dev
	"
subpackages="$pkgname-doc"
source="https://github.com/rapier1/hpn-ssh/archive/refs/tags/hpn-$pkgver.tar.gz"
builddir="$srcdir/hpn-ssh-hpn-$pkgver"
# hpnssh-keysign need suid
options="suid"

build() {
	autoreconf -fi
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-mantype=man
	make
}

check() {
	make -j1 file-tests interop-tests unit
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
46b84dc2a23a20d86c770109ee20b170546966ee55b1636863d92873c2e42a68accfdf4ee6a77cfa1b0af71cee8e2f8e77cbc126330280dd4ca4a572c3cc0626  hpn-18.4.1.tar.gz
"
